<template>
  <div class="userInfo">
    <nav-bar />
    <img src="../assets/bannerTop_new.png" alt />
    <user-detail :userInfo="userInfo_model" />
  </div>
</template>

<script>
import NavBar from "../components/Navbar";
import UserDetail from "../components/userComponents/UserDetail";
export default {
  components: {
    NavBar,
    UserDetail
  },
  data() {
    return {
      userInfo_model: {}
    };
  },
  methods: {
    async userAxios() {
      const res = await this.$http.get("/user/" + localStorage.getItem("id"));
      this.userInfo_model = res.data[0];
    }
  },
  created() {
    this.userAxios();
  }
};
</script>

<style lang="less" scoped>
img {
  height: 25vw;
  width: 100%;
}
</style>